package com.biscuit.page.basicservice.remote.api;

import com.biscuit.common.base.BaseListResponse;
import com.biscuit.common.base.BaseResponse;
import com.biscuit.common.base.BaseResponseVoid;
import com.biscuit.page.basicservice.api.IInterviewRemote;
import com.biscuit.page.basicservice.api.model.request.interview.InterviewMergeMaxFileAReq;
import com.biscuit.page.basicservice.api.model.response.interview.InterviewExcelMaxFileResolverAResp;
import com.biscuit.page.basicservice.api.model.response.interview.InterviewUploadMaxFileAResp;
import com.biscuit.page.basicservice.service.InterviewService;
import com.biscuit.page.basicservice.utils.BaseResponseUtil;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;

/**
 * @author biscuit
 * @createTime 2024/7/2 14:46
 */
@RestController
public class InterviewRemoteImpl implements IInterviewRemote {

    @Resource
    private InterviewService service;

    @Override
    public BaseResponse<InterviewUploadMaxFileAResp> uploadMaxFile(MultipartFile multipartFile, String fileName, String contentType, String uploadId, Integer index, Integer totalPart) {
        return BaseResponseUtil.success(this.service.uploadMaxFile(multipartFile, fileName, contentType, uploadId, index, totalPart));
    }

    @Override
    public BaseResponse<InterviewUploadMaxFileAResp> mergeMaxFile(InterviewMergeMaxFileAReq req) {
        return BaseResponseUtil.success(this.service.mergeMaxFile(req));
    }
}
